Small additions.
authorMatthias Clasen <matthiasc@src.gnome.org>
Thu, 3 Jan 2002 23:04:44 +0000 (23:04 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 3 Jan 2002 23:04:44 +0000 (23:04 +0000)
        * gtk/tmpl/gtktextview.sgml: Small additions.

        * gtk/tmpl/gtksignal.sgml: Explain what to use instead.

        * gtk/question_index.sgml, gtk/text_widget.sgml, gtk/tree_widget.sgml,
        gtk/changes-1.2.sgml, gtk/changes-2.0.sgml,
        gtk/framebuffer.sgml: SGML fixes and additions.

        * gtk/tmpl/gtksignal.sgml, gtk/tmpl/gtkdialog.sgml,
        gtk/tmpl/gtkeditable.sgml, gtk/tmpl/gtkfilesel.sgml,
        gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
        gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkrc.sgml,
        gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtkspinbutton.sgml,
        gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkwindow.sgml:
        Replace references to deprecated functions.

20 files changed:
docs/reference/ChangeLog
docs/reference/gtk/changes-1.2.sgml
docs/reference/gtk/changes-2.0.sgml
docs/reference/gtk/framebuffer.sgml
docs/reference/gtk/question_index.sgml
docs/reference/gtk/text_widget.sgml
docs/reference/gtk/tmpl/gtkdialog.sgml
docs/reference/gtk/tmpl/gtkeditable.sgml
docs/reference/gtk/tmpl/gtkfilesel.sgml
docs/reference/gtk/tmpl/gtkmain.sgml
docs/reference/gtk/tmpl/gtkmenu.sgml
docs/reference/gtk/tmpl/gtkmessagedialog.sgml
docs/reference/gtk/tmpl/gtkpaned.sgml
docs/reference/gtk/tmpl/gtkrc.sgml
docs/reference/gtk/tmpl/gtksignal.sgml
docs/reference/gtk/tmpl/gtkspinbutton.sgml
docs/reference/gtk/tmpl/gtktextview.sgml
docs/reference/gtk/tmpl/gtktogglebutton.sgml
docs/reference/gtk/tmpl/gtkwindow.sgml
docs/reference/gtk/tree_widget.sgml

index b22a5e437f6f4d7ea0de5bf2dd978c10c0c19286..ec94359f972ebef29fa563878a762e9eca2f3cfe 100644 (file)
@@ -1,3 +1,21 @@
+2002-01-04  Matthias Clasen  <matthiasc@poet.de>
+
+       * gtk/tmpl/gtktextview.sgml: Small additions.
+
+       * gtk/tmpl/gtksignal.sgml: Explain what to use instead.
+
+       * gtk/question_index.sgml, gtk/text_widget.sgml, gtk/tree_widget.sgml,
+       gtk/changes-1.2.sgml, gtk/changes-2.0.sgml,
+       gtk/framebuffer.sgml: SGML fixes and additions.
+
+       * gtk/tmpl/gtksignal.sgml, gtk/tmpl/gtkdialog.sgml,
+       gtk/tmpl/gtkeditable.sgml, gtk/tmpl/gtkfilesel.sgml,
+       gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
+       gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkrc.sgml,
+       gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtkspinbutton.sgml,
+        gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkwindow.sgml:
+       Replace references to deprecated functions.
+
 2002-01-03  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/changes-1.2.sgml, gtk/changes-2.0.sgml, 
index d30e4b63ce032cd45d72bd14d25cc47807d9cce4..f54a1dabec24a238301fa582f906d48504a107d9 100644 (file)
@@ -88,27 +88,29 @@ A number of GTK+ functions were renamed. For compatibility,
 
   Here is the list of the old names and replacements:
 
-<programlisting>
-  Old:                               Replacement:
-
-  gtk_accel_label_accelerator_width   gtk_accel_label_get_accel_width
-  gtk_check_menu_item_set_state              gtk_check_menu_item_set_active
-  gtk_container_border_width         gtk_container_set_border_width
-  gtk_label_set                      gtk_label_set_text
-  gtk_notebook_current_page           gtk_notebook_get_current_page
-  gtk_packer_configure                gtk_packer_set_child_packing
-  gtk_paned_gutter_size                      gtk_paned_set_gutter_size
-  gtk_paned_handle_size                      gtk_paned_set_handle_size
-  gtk_scale_value_width               gtk_scale_get_value_width
-  gtk_style_apply_default_pixmap      gtk_style_apply_default_background (1)
-  gtk_toggle_button_set_state         gtk_toggle_button_set_active
-  gtk_window_position                gtk_window_set_position
-  (1) gtk_style_apply_default_background() has an additional
-      argument, gboolean set_bg. This parameter should be 
+<informaltable>
+<thead>
+<row><entry>Old</entry><entry>Replacement</entry></row>
+</thead>
+<tbody>
+<row><entry><function>gtk_accel_label_accelerator_width</function></entry><entry><function>gtk_accel_label_get_accel_width</function></entry></row>
+<row><entry><function>gtk_check_menu_item_set_state</function></entry><entry><function>gtk_check_menu_item_set_active</function></entry></row>
+<row><entry><function>gtk_container_border_width</function></entry><entry><function>gtk_container_set_border_width</function></entry></row>
+<row><entry><function>gtk_label_set</function></entry><entry><function>gtk_label_set_text</function></entry></row>
+<row><entry><function>gtk_notebook_current_page</function></entry><entry><function>gtk_notebook_get_current_page</function></entry></row>
+<row><entry><function>gtk_packer_configure</function></entry><entry><function>gtk_packer_set_child_packing</function></entry></row>
+<row><entry><function>gtk_paned_gutter_size</function></entry><entry><function>gtk_paned_set_gutter_size</function></entry></row>
+<row><entry><function>gtk_paned_handle_size</function></entry><entry><function>gtk_paned_set_handle_size</function></entry></row>
+<row><entry><function>gtk_scale_value_width</function></entry><entry><function>gtk_scale_get_value_width</function></entry></row>
+<row><entry><function>gtk_style_apply_default_pixmap</function></entry><entry><function>gtk_style_apply_default_background</function></entry></row>
+<row><entry><function>gtk_toggle_button_set_state</function></entry><entry><function>gtk_toggle_button_set_active</function></entry></row>
+<row><entry><function>gtk_window_position</function></entry><entry><function>gtk_window_set_position</function></entry></row>
+</tbody>
+</informaltable> 
+Note that <function>gtk_style_apply_default_background()</function> has an 
+      additional argument, <literal>set_bg</literal>. This parameter should be 
       <literal>FALSE</literal> if the background is being set for a 
-      NO_WINDOW widget, otherwise <literal>TRUE</literal>.
-</programlisting>
+      <literal>NO_WINDOW</literal> widget, otherwise <literal>TRUE</literal>.
 </para>
 </listitem>
 
@@ -117,26 +119,32 @@ A number of GTK+ functions were renamed. For compatibility,
 During the development phase of the 1.1.x line of GTK+ certain functions
   were deprecated and later removed. Functions affected are:
 
-<programlisting>
-  Removed:                          Replacement:
-  gtk_clist_set_border             gtk_clist_set_shadow_type
-  gtk_container_block_resize       gtk_container_set_resize_mode
-  gtk_container_unblock_resize     gtk_container_set_resize_mode
-  gtk_container_need_resize        gtk_container_check_resize
-  gtk_ctree_show_stub              gtk_ctree_set_show_stub
-  gtk_ctree_set_reorderable        gtk_clist_set_reorderable
-  gtk_ctree_set_use_drag_icons     gtk_clist_set_use_drag_icons
-  gtk_entry_adjust_scroll          (1)
-  gtk_object_class_add_user_signal  gtk_object_class_user_signal_new
-  gtk_preview_put_row              gtk_preview_put
-  gtk_progress_bar_construct       gtk_progress_set_adjustment
-  gtk_scrolled_window_construct            gtk_scrolled_window_set_{h|v}adjustment
-  gtk_spin_button_construct        gtk_spin_button_configure
-  gtk_widget_thaw_accelerators     gtk_widget_unlock_accelerators
-  gtk_widget_freeze_accelerators    gtk_widget_lock_accelerators
-
-(1) This function is no longer needed as GtkEntry should automatically
-    keep the scroll adjusted properly.
+<informaltable>
+<thead>
+<row><entry>Removed</entry><entry>Replacement</entry></row>
+</thead>
+<tbody>
+<row><entry><function>gtk_clist_set_border</function></entry><entry><function>gtk_clist_set_shadow_type</function></entry></row>
+<row><entry><function>gtk_container_block_resize</function></entry><entry><function>gtk_container_set_resize_mode</function></entry></row>
+<row><entry><function>gtk_container_unblock_resize</function></entry><entry><function>gtk_container_set_resize_mode</function></entry></row>
+<row><entry><function>gtk_container_need_resize</function></entry><entry><function>gtk_container_check_resize</function></entry></row>
+<row><entry><function>gtk_ctree_show_stub</function></entry><entry><function>gtk_ctree_set_show_stub</function></entry></row>
+<row><entry><function>gtk_ctree_set_reorderable</function></entry><entry><function>gtk_clist_set_reorderable</function></entry></row>
+<row><entry><function>gtk_ctree_set_use_drag_icons</function></entry><entry><function>gtk_clist_set_use_drag_icons</function></entry></row>
+<row><entry><function>gtk_entry_adjust_scroll</function></entry><entry><function>-</function></entry></row>
+<row><entry><function>gtk_object_class_add_user_signal</function></entry><entry><function>gtk_object_class_user_signal_new</function></entry></row>
+<row><entry><function>gtk_preview_put_row</function></entry><entry><function>gtk_preview_put</function></entry></row>
+<row><entry><function>gtk_progress_bar_construct</function></entry><entry><function>gtk_progress_set_adjustment</function></entry></row>
+<row><entry><function>gtk_scrolled_window_construct</function></entry><entry><function>gtk_scrolled_window_set_{h|v}adjustment</function></entry></row>
+<row><entry><function>gtk_spin_button_construct</function></entry><entry><function>gtk_spin_button_configure</function></entry></row>
+<row><entry><function>gtk_widget_thaw_accelerators</function></entry><entry><function>gtk_widget_unlock_accelerators</function></entry></row>
+<row><entry><function>gtk_widget_freeze_accelerators</function></entry><entry><function>gtk_widget_lock_accelerators</function></entry></row>
+</tbody>
+</informaltable>
+
+Note that <function>gtk_entry_adjust_scroll()</function> is no longer needed 
+    as <structname>GtkEntry</structname> should automatically keep the scroll 
+    adjusted properly.
 </programlisting>
 </para>
 </listitem>
@@ -253,7 +261,7 @@ The <structname>GtkScrolledWindow</structname> widget no longer creates a
 
 <para>
   To add scrollbars to a non self-scrolling widget, (such as a 
-  <function>GtkList</function>),
+  <structname>GtkList</structname>),
   first add it to a viewport, then add the viewport to a scrolled window.
   The scrolled window code provides a convenience function to do this:
 
@@ -300,22 +308,22 @@ All freeze/thaw methods are now recursive - that is, if you
 
   Therefore, if you have code like:
 
-<programlisting>
+<informalexample><programlisting>
   gboolean frozen;
   frozen = GTK_CLIST_FROZEN (clist);
   gtk_clist_freeze (clist);
   [...]
   if (!frozen)
     gtk_clist_thaw (clist);
-</programlisting>
+</programlisting></informalexample>
 
   it will not work anymore. It must be, simply:
 
-<programlisting>
+<informalexample><programlisting>
   gtk_clist_freeze (clist);
   [...]
   gtk_clist_thaw (clist);
-</programlisting>
+</programlisting></informalexample>
 </para>
 </listitem>
 
@@ -351,7 +359,7 @@ The thread safety in GTK+ 1.2 is slightly different than
      </para>
 
      <para>In particular, this means, if you are writing widgets
-       that might be used in threaded programs, you _must_
+       that might be used in threaded programs, you <emphasis>must</emphasis>
        surround timeouts and idle functions in this matter.
      </para>
      
index fe7e30d6041db5cc1c108fd3e39b14569fd46e7c..27af0d19cd6e857b0163290ad8fe3b46e869c896 100644 (file)
@@ -50,7 +50,7 @@ exist whenever possible.
 
 <listitem>
 <para>
-The <function>gdk_time*()</function> functions have been removed. This 
+The <function>gdk_time*</function> functions have been removed. This 
   functionality has been unused since the main loop was moved into GLib
   prior to 1.2. 
 </para>
@@ -163,27 +163,30 @@ The type macros <function>GTK_TYPE_MAKE()</function> and <function>GTK_TYPE_SEQN
 <listitem>
 <para>
 The following type functions vanished/were replaced:
-<programlisting>
-    Old Function                Replacement
-    gtk_type_query()            - being investigated -
-    gtk_type_set_varargs_type()         -
-    gtk_type_get_varargs_type()         -
-    gtk_type_check_object_cast() g_type_check_instance_cast()
-    gtk_type_check_class_cast()         g_type_check_class_cast()
-    gtk_type_describe_tree()    -
-    gtk_type_describe_heritage() -
-    gtk_type_free()             -
-    gtk_type_children_types()   g_type_children()
-    gtk_type_set_chunk_alloc()  GTypeInfo.n_preallocs
-    gtk_type_register_enum()    g_enum_register_static()
-    gtk_type_register_flags()   g_flags_register_static()
-    gtk_type_parent_class()     g_type_parent() /
-    g_type_class_peek_parent()
-</programlisting>
-    Use of g_type_class_ref() / g_type_class_unref() and g_type_class_peek()
-    is recommended over usage of gtk_type_class().
-    Use of g_type_register_static() / g_type_register_dynamic() is recommended
-    over usage of gtk_type_unique().
+<informaltable>
+<thead>
+<row><entry>Old Function</entry><entry>Replacement</entry></row>
+</thead>
+<tbody>
+<row><entry><function>gtk_type_query()</function></entry><entry>being investigated</entry></row>
+<row><entry><function>gtk_type_set_varargs_type()</function></entry><entry>-</entry></row>
+<row><entry><function>gtk_type_get_varargs_type()</function></entry><entry>-</entry></row>
+<row><entry><function>gtk_type_check_object_cast()</function></entry><entry><function>g_type_check_instance_cast()</function></entry></row>
+<row><entry><function>gtk_type_check_class_cast()</function></entry><entry><function>g_type_check_class_cast()</function></entry></row>
+<row><entry><function>gtk_type_describe_tree()</function></entry><entry>-</entry></row>
+<row><entry><function>gtk_type_describe_heritage()</function></entry><entry>-</entry></row>
+<row><entry><function>gtk_type_free()</function></entry><entry>-</entry></row>
+<row><entry><function>gtk_type_children_types()</function></entry><entry><function>g_type_children()</function></entry></row>
+<row><entry><function>gtk_type_set_chunk_alloc()</function></entry><entry><structfield>GTypeInfo.n_preallocs</structfield></entry></row>
+<row><entry><function>gtk_type_register_enum()</function></entry><entry><function>g_enum_register_static()</function></entry></row>
+<row><entry><function>gtk_type_register_flags()</function></entry><entry><function>g_flags_register_static()</function></entry></row>
+<row><entry><function>gtk_type_parent_class()</function></entry><entry><functiono>g_type_parent()</function>/<function>g_type_class_peek_parent()</function></entry></row>
+</tbody>
+</informaltable>
+    Use of <function>g_type_class_ref()</function>/<function>g_type_class_unref()</function> and <function>g_type_class_peek()</function>
+    is recommended over usage of <function>gtk_type_class()</function>.
+    Use of <function>g_type_register_static()</function>/<function>g_type_register_dynamic()</function> is recommended
+    over usage of <function>gtk_type_unique()</function>.
 </para>
 </listitem>
 </itemizedlist>
@@ -199,14 +202,14 @@ Object system changes:
 
 <listitem>
 <para>
-<structname>GtkObject</structname> has no <literal>klass</literal> field anymore, an object's class can be retrieved
+<structname>GtkObject</structname> has no <structfield>klass</structfield> field anymore, an object's class can be retrieved
     with the object's coresponding <literal>GTK_&lt;OBJECT&gt;_GET_CLASS (object)</literal>
     macro.
 </para>
 </listitem>
 <listitem>
 <para>
-<structname>GtkObjectClass</structname> has no <literal>type</literal> field anymore, a class's type can be retrived
+<structname>GtkObjectClass</structname> has no <structfield>type</structfield> field anymore, a class's type can be retrived
     with the <literal>GTK_CLASS_TYPE (class)</literal> macro.
 </para>
 </listitem>
@@ -216,7 +219,7 @@ Object system changes:
     anymore. While <function>shutdown()</function> is intended for GTK+ internal use only, <function>finalize()</function>
     is required by a variety of object implementations. <function>GObjectClass.finalize</function>
     should be overriden here, e.g.:
-<programlisting>
+<informalexample><programlisting>
     static void gtk_label_finalize (GObject *gobject)
     {
       GtkLabel *label = GTK_LABEL (gobject);
@@ -229,7 +232,7 @@ Object system changes:
       
       gobject_class-&gt;finalize = gtk_label_finalize;
     }
-</programlisting>
+</programlisting></informalexample>
 </para>
 </listitem>
 
@@ -243,23 +246,23 @@ The GtkObject::destroy signal can now be emitted multiple times on an object.
     ::destroy implementations should check that make sure that they take this
     into account, by checking to make sure that resources are there before
     freeing them. For example:
-<programlisting>
+<informalexample><programlisting>
     if (object-&gt;foo_data)
       { 
         g_free (object-&gt;foo_data);
         object-&gt;foo_data = NULL;
       }
-</programlisting>
+</programlisting></informalexample>
 
     Also, ::destroy implementations have to release object references that
     the object holds. Code in finalize implementations such as:
-<programlisting>
+<informalexample><programlisting>
     if (object-&gt;adjustment)
       {
         gtk_object_unref (object-&gt;adjustment);
         object-&gt;adjustment = NULL;
       }
-</programlisting>
+</programlisting></informalexample>
     have to be moved into the ::destroy implementations. The reason for doing
     this is that all object reference cycles should be broken at destruction 
     time.
@@ -275,11 +278,11 @@ The GtkObject::destroy signal can now be emitted multiple times on an object.
 <listitem>
 <para>
 Signal system changes:
-  The GTK+ 2.0 signal system merely proxies the <structname>GSignal</structname 
+  The GTK+ 2.0 signal system merely proxies the <structname>GSignal</structname> 
   system now. For future usage, direct use of the 
   <structname>GSignal</structname> API is recommended,
   this avoids significant performance hits where <structname>GtkArg</structname>
-  structures have to be converted into <structname>GValues</structname>. For 
+  structures have to be converted into <structname>GValue</structname>s. For 
   language bindings, <structname>GSignal</structname>+</structname>GClosure</structname>
   provide a much more flexible and convenient mechanism to hook into signal 
   emissions or install class default handlers, so the old 
@@ -320,9 +323,9 @@ Inserting and deleting text in <structname>GtkEntry</structname> though
 
 <listitem>
 <para>
-The <literal>-&gt;label</literal> field of <structname>GtkFrame</structname> 
-  widgets has been removed. (As part of a change to allow arbitrary widgets 
-  in the title position.) The text can now be retrieved with the new function 
+The <structfield>label</structfield> field of <structname>GtkFrame</structname> 
+  widgets has been removed (as part of a change to allow arbitrary widgets 
+  in the title position). The text can now be retrieved with the new function 
   <function>gtk_frame_get_text()</function>.
 </para>
 </listitem>
@@ -373,18 +376,18 @@ All drawables including pixmaps used to have a type tag, the
 
 <listitem>
 <para>
-<literal>xthickness</literal>/</literal>ythickness</literal> have moved from 
+<structfield>xthickness</structfield> and <structfield>ythickness</structfield> have moved from 
   <structname>GtkStyleClass</structname> to <structname>GtkStyle</structname>
   (from class to instance). This gives themes a bit more flexibility
   and is generally more of the Right Thing. You can trivially fix
   your code with <literal>s/style-&gt;klass-&gt;xthickness/style-&gt;xthickness/g</literal> and 
-  same for <literal>ythickness</literal>.
+  same for <structfield>ythickness</structfield>.
 </para>
 </listitem>
 
 <listitem>
 <para>
-Some <structname>GtkStyle</structname> <function>draw_*()</function> methods 
+Some <structname>GtkStyle</structname> <function>draw_*</function> methods 
   have been removed (cross, oval, ramp) 
   and others have been added (expander, layout). This will require
   changes to theme engines.
@@ -418,35 +421,34 @@ A number of functions in GDK have been renamed for consistency and
   clarity. #defines to provide backwards compatibility have been
   included, but can be disabled by defining <literal>GDK_DISABLE_DEPRECATED</literal>.
 
-<programlisting>
-  #define gdk_draw_pixmap                gdk_draw_drawable
-  #define gdk_draw_bitmap                gdk_draw_drawable
-
-  #define gdk_window_get_size            gdk_drawable_get_size
-  #define gdk_window_get_type            gdk_window_get_window_type
-  #define gdk_window_get_colormap        gdk_drawable_get_colormap
-  #define gdk_window_set_colormap        gdk_drawable_set_colormap
-  #define gdk_window_get_visual          gdk_drawable_get_visual
-
-  #define gdk_window_ref                 gdk_drawable_ref
-  #define gdk_window_unref               gdk_drawable_unref
-  #define gdk_bitmap_ref                 gdk_drawable_ref
-  #define gdk_bitmap_unref               gdk_drawable_unref
-  #define gdk_pixmap_ref                 gdk_drawable_ref
-  #define gdk_pixmap_unref               gdk_drawable_unref
-
-  #define gdk_gc_destroy                 gdk_gc_unref
-  #define gdk_image_destroy              gdk_image_unref
-  #define gdk_cursor_destroy             gdk_cursor_unref
-
-  (Note that g_object_ref() and g_object_unref() may be used for all of
-  the above _ref and _unref functions.)
-
-  #define gdk_window_copy_area(drawable,gc,x,y,source_drawable,source_x,source_y,width,height) \
-     gdk_draw_pixmap(drawable,gc,source_drawable,source_x,source_y,x,y,width,height)
-
-  #define gdk_rgb_get_cmap               gdk_rgb_get_colormap
-</programlisting>  
+<informaltable>
+<thead>
+<row><entry>Old function</entry><entry>Defined As</entry></row>
+</thead>
+<tbody>
+<row><entry><function>gdk_draw_pixmap</function></entry><entry><function>gdk_draw_drawable</function></entry></row>
+ <row><entry><function>gdk_draw_bitmap</function></entry><entry><function>gdk_draw_drawable</function></entry></row>               
+<row><entry><function>gdk_window_get_size</function></entry><entry><function>gdk_drawable_get_size</function></entry></row>               
+<row><entry><function>gdk_window_get_type</function></entry><entry><function>gdk_window_get_window_type</function></entry></row>               
+<row><entry><function>gdk_window_get_colormap</function></entry><entry><function>gdk_drawable_get_colormap</function></entry></row>
+<row><entry><function>gdk_window_set_colormap</function></entry><entry><function>gdk_drawable_set_colormap</function></entry></row>
+<row><entry><function>gdk_window_get_visual</function></entry><entry><function>gdk_drawable_get_visual</function></entry></row>
+<row><entry><function>gdk_window_ref</function></entry><entry><function>gdk_drawable_ref</function></entry></row>
+<row><entry><function>gdk_window_unref</function></entry><entry><function>gdk_drawable_unref</function></entry></row>
+<row><entry><function>gdk_bitmap_ref</function></entry><entry><function>gdk_drawable_ref</function></entry></row>
+<row><entry><function>gdk_bitmap_unref</function></entry><entry><function>gdk_drawable_unref</function></entry></row>
+<row><entry><function>gdk_pixmap_ref</function></entry><entry><function>gdk_drawable_ref</function></entry></row>
+<row><entry><function>gdk_pixmap_unref</function></entry><entry><function>gdk_drawable_unref</function></entry></row>
+<row><entry><function>gdk_gc_destroy</function></entry><entry><function>gdk_gc_unref</function></entry></row>
+<row><entry><function>gdk_image_destroy</function></entry><entry><function>gdk_image_unref</function></entry></row>
+<row><entry><function>gdk_cursor_destroy</function></entry><entry><function>gdk_cursor_unref</function></entry></row>
+<row><entry><function>gdk_window_copy_area(drawable,gc,x,y,source_drawable,source_x,source_y,width,height)</function></entry><entry><function>gdk_draw_pixmap(drawable,gc,source_drawable,source_x,source_y,x,y,width,height)</function></entry></row>
+<row><entry><function>gdk_rgb_get_cmap</function></entry><entry><function>gdk_rgb_get_colormap</function></entry></row>
+</tbody>
+</informaltable>
+  (Note that <function>g_object_ref()</function> and 
+  <function>g_object_unref()</function> may be used for all of the above ref 
+  and unref functions.)
 
   <function>gtk_widget_popup()</function> was removed, it was only usable 
   for <structname>GtkWindow</structname>s, and there the same effect can be 
@@ -474,9 +476,9 @@ A number of functions in GDK have been renamed for consistency and
 <itemizedlist>
 <listitem>
 <para>
-Only 3 or 4 functions are really needed for 95% of progress  
-    interfaces; <structname>GtkProgress[Bar]</structname> had about 25 
-    functions, and didn't even include these 3 or 4.
+Only 3 or 4 functions are really needed for 95% of progress interfaces; 
+  <structname>GtkProgress</structname>/<structname>GtkProgressBar</structname> 
+  had about 25 functions, and didn't even include these 3 or 4.
 </para>
 </listitem>
 
@@ -581,8 +583,8 @@ The "draw" signal and virtual method on <structname>GtkWidget</structname>
 
 <listitem>
 <para>
-The <structname>GdkExposeEvent</structname> has a new <literal>region</literal>
-  field. This can be used instead of the <literal>area</literal> field if you 
+The <structname>GdkExposeEvent</structname> has a new <structfield>region</structfield>
+  field. This can be used instead of the <structfield>area</structfield> field if you 
   want a more exact representation of the area to update.
 </para>
 </listitem>
@@ -637,7 +639,7 @@ The draw_default and draw_focus methods/signals on
 
 <listitem>
 <para>
-<structname>GtkMenuBar</structname> now draws the GtkContainer::border_width 
+<structname>GtkMenuBar</structname> now draws the <structfield>GtkContainer::border_width</structfield> 
   space outside the frame, not inside the frame.
 </para>
 </listitem>
@@ -741,14 +743,19 @@ The <function>set_child_arg()</function> and <function>get_child_arg()</function
 <para>
 Other removed <structname>GtkContainer</structname> functions with the replacements:
 
-<programlisting>
-     gtk_container_add_child_arg_type => gtk_container_class_install_child_property
-     gtk_container_query_child_args   => gtk_container_class_list_child_properties
-     gtk_container_child_getv         => gtk_container_child_set_property
-     gtk_container_child_setv         => gtk_container_child_get_property
-     gtk_container_add_with_args      => gtk_container_add_with_properties
-     gtk_container_addv               => gtk_container_add / gtk_container_child_set_property
-</programlisting>
+<informaltable>
+<thead>
+<row><entry>Old function</entry><entry>Replacement</entry></row>
+</thead>
+<tbody>
+<row><entry><function>gtk_container_add_child_arg_type</function></entry><entry><function>gtk_container_class_install_child_property</function></entry></row>
+<row><entry><function>gtk_container_query_child_args</function></entry><entry><function>gtk_container_class_list_child_properties</function></entry></row>
+<row><entry><function>gtk_container_child_getv</function></entry><entry><function>gtk_container_child_set_property</function></entry></row>
+<row><entry><function>gtk_container_child_setv</function></entry><entry><function>gtk_container_child_get_property</function></entry></row>
+<row><entry><function>gtk_container_add_with_args</function></entry><entry><function>gtk_container_add_with_properties</function></entry></row>
+<row><entry><function>gtk_container_addv</function></entry><entry><function>gtk_container_add</function>/<function>gtk_container_child_set_property</function></entry></row>
+</tbody>
+</informaltable>
 </para>
 </listitem>
 
index cba73c02a3134a591b5f4b094d091723668fa68f..0ff649cd6a7bbe50ed93d03a394406e373319374 100644 (file)
@@ -83,20 +83,20 @@ the key <literal>AliasFiles</literal> in the <literal>PangoFT2</literal> section
 
 <para>
 An example of a font alias file for the urw fontset is:
-<programlisting>
+<informalexample><programlisting>
 sans normal normal normal normal "urw gothic l"
 serif normal normal normal normal "urw palladio l"
 monospace normal normal normal normal "nimbus mono l"
-</programlisting>
+</programlisting></informalexample>
 </para>
 
 <para>
 And one using the Windows TrueType fonts is:
-<programlisting>
+<informalexample><programlisting>
 sans normal normal normal normal "arial"
 serif normal normal normal normal "times new roman"
 monospace normal normal normal normal "courier new"
-</programlisting>
+</programlisting></informalexample>
 
 A more detailed example can be found in 
 <filename>examples/pangoft2.aliases</filename> in the
index 9f4116454f54c23b66db0469e58cac7cc20eeb3f..4f545cc4971e3e50ae56035e400740c79afbf640 100644 (file)
@@ -173,7 +173,7 @@ or <link
           linkend="gtk-text-iter-get-text">gtk_text_iter_get_text()</link>.
 </para>
 <para>
-<programlisting>
+<informalexample><programlisting>
   GtkTextIter start, end;
   GtkTextBuffer *buffer;
   char *text;
@@ -183,7 +183,7 @@ or <link
   text = gtk_text_iter_get_text (&amp;start, &amp;end);
   /* use text */
   g_free (text);
-</programlisting>
+</programlisting></informalexample>
 </para></answer>
 </qandaentry>
 
index ef8bbb201cc354fc6f9eaaea434ecd833d330dd8..144a3bbe571f3ac5ff57214d337d2351748fa578 100644 (file)
@@ -95,9 +95,9 @@ appears by moving these marks around.
 <footnote>
 <para>
 If you want to place the cursor in response to a user action, be sure to use
-gtk_text_buffer_place_cursor(), which moves both at once without causing a
-temporary selection (moving one then the other temporarily selects the range in
-between the old and new positions).
+<function>gtk_text_buffer_place_cursor()</function>, which moves both at once 
+without causing a temporary selection (moving one then the other temporarily 
+selects the range in between the old and new positions).
 </para>
 </footnote>
 </para>
@@ -122,7 +122,7 @@ considered a line separator.
 <para>
 The simplest usage of <link linkend="GtkTextView">GtkTextView</link> 
 might look like this:
-<programlisting>
+<informalexample><programlisting>
   GtkWidget *view;
   GtkTextBuffer *buffer;
 
@@ -136,12 +136,12 @@ might look like this:
    * screen; when the user edits the text, signals on the buffer
    * will be emitted, such as "changed", "insert_text", and so on.
    */
-</programlisting>
+</programlisting></informalexample>
 In many cases it's also convenient to first create the buffer with
-gtk_text_buffer_new(), then create a widget for that buffer with
-gtk_text_view_new_with_buffer(). Or you can change the buffer the
-widget displays after the widget is created with
-gtk_text_view_set_buffer().
+<function>gtk_text_buffer_new()</function>, then create a widget for that 
+buffer with <function>gtk_text_view_new_with_buffer()</function>. Or you can 
+change the buffer the widget displays after the widget is created with
+<function>gtk_text_view_set_buffer()</function>.
 </para>
 
 </refsect1>
@@ -167,7 +167,7 @@ For other attributes there are dedicated methods on
 <link linkend="GtkTextView">GtkTextView</link> such as 
 <link linkend="gtk-text-view-set-tabs">gtk_text_view_set_tabs()</link>.
 
-<programlisting>
+<informalexample><programlisting>
   GtkWidget *view;
   GtkTextBuffer *buffer;
   PangoFontDescription *font_desc;
@@ -198,7 +198,7 @@ For other attributes there are dedicated methods on
   gtk_text_buffer_get_iter_at_offset (buffer, &amp;start, 7);
   gtk_text_buffer_get_iter_at_offset (buffer, &amp;end, 12);
   gtk_text_buffer_apply_tag (buffer, tag, &amp;start, &amp;end);
-</programlisting>
+</programlisting></informalexample>
 
 </para>
 
index ceaf5225c1df48afa40bc404bf648bba85e6ad1c..b9a1013be4b36ef3be33ce7068cb79887480fe0d 100644 (file)
@@ -89,9 +89,10 @@ void quick_message (gchar *message) {
    
    /* Ensure that the dialog box is destroyed when the user responds. */
    
-   gtk_signal_connect_object (GTK_OBJECT (dialog), "response",
-                              GTK_SIGNAL_FUNC (gtk_widget_destroy), 
-                              GTK_OBJECT (dialog));
+   g_signal_connect_swapped (GTK_OBJECT (dialog), 
+                             "response", 
+                             G_CALLBACK (gtk_widget_destroy),
+                             GTK_OBJECT (dialog));
 
    /* Add the label, and show everything we've added to the dialog. */
 
index 0642d38ef351c47ad15ff575e6628ba23f400c86..0573f87205f6940d4757523dfab45a9851fd2b72 100644 (file)
@@ -39,15 +39,13 @@ insert_text_handler (GtkEditable *editable,
   for (i = 0; i &lt; length; i++)
     result[i] = islower (text[i]) ? toupper (text[i]) : text[i];
 
-  gtk_signal_handler_block_by_func (GTK_OBJECT (editable),
-                                   GTK_SIGNAL_FUNC (insert_text_handler),
-                                   data);
+  g_signal_handlers_block_by_func (GTK_OBJECT (editable), 
+                                  insert_text_handler, data);
   gtk_editable_insert_text (editable, result, length, position);
-  gtk_signal_handler_unblock_by_func (GTK_OBJECT (editable),
-                                     GTK_SIGNAL_FUNC (insert_text_handler),
-                                     data);
+  g_signal_handlers_unblock_by_func (GTK_OBJECT (editable), 
+                                     insert_text_handler, data);
 
-  gtk_signal_emit_stop_by_name (GTK_OBJECT (editable), "insert_text");
+  g_signal_stop_emission_by_name (GTK_OBJECT (editable), "insert_text"); 
 
   g_free (result);
 }
index 450fb16f8ec32941bafd00e21eab47fb29321288..55d1f4191fb2360ba360000559cd807a15615692 100644 (file)
@@ -47,18 +47,22 @@ void create_file_selection (void) {
    
    file_selector = gtk_file_selection_new ("Please select a file for editing.");
    
-   gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->ok_button),
-                          "clicked", GTK_SIGNAL_FUNC (store_filename), NULL);
+   g_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->ok_button),
+                     "clicked",
+                     G_CALLBACK (store_filename),
+                     NULL);
                           
    /* Ensure that the dialog box is destroyed when the user clicks a button. */
    
-   gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->ok_button),
-                                         "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy),
-                                         (gpointer) file_selector);
-
-   gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->cancel_button),
-                                         "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy),
-                                         (gpointer) file_selector);
+   g_signal_connect_swapped (GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->ok_button),
+                             "clicked",
+                             G_CALLBACK (gtk_widget_destroy), 
+                             (gpointer) file_selector); 
+
+   g_signal_connect_swapped (GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->cancel_button),
+                             "clicked",
+                             G_CALLBACK (gtk_widget_destroy),
+                             (gpointer) file_selector); 
    
    /* Display that dialog */
    
index 1c56e514245547cdc9f8df03fc7a66eb2dff2ace..4f738f6c4d3f3443deb132554a49d055f9905a05 100644 (file)
@@ -323,15 +323,14 @@ main (int argc, char **argv)
   gtk_init( &amp;argc, &amp;argv );
 
   win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_signal_connect (GTK_OBJECT(win), "delete-event", 
-                      (GtkSignalFunc) gtk_true, NULL);
-  gtk_signal_connect (GTK_OBJECT(win), "destroy", 
-                     (GtkSignalFunc) gtk_main_quit, NULL);
+  g_signal_connect (GTK_OBJECT(win), "delete-event", 
+                    G_CALLBACK (gtk_true), NULL);
+  g_signal_connect (GTK_OBJECT(win), "destroy", 
+                   G_CALLBACK (gtk_main_quit), NULL);
 
   but = gtk_button_new_with_label ("Close yourself. I mean it!");
-  gtk_signal_connect_object (
-                 GTK_OBJECT (but), "clicked", 
-                 (GtkSignalFunc) gtk_object_destroy, (gpointer) win );
+  g_signal_connect_swapped (GTK_OBJECT (but), "clicked", 
+                 G_CALLBACK (gtk_object_destroy), (gpointer) win);
   gtk_container_add (GTK_CONTAINER (win), but);
 
   gtk_widget_show_all (win);
index 19a052fb9f1924d76c8688be447a107f3d3e73d6..c060e31b9236b8010becde9b8f67316c0904267f 100644 (file)
@@ -32,8 +32,8 @@ can pop up a menu when the 3rd mouse button is pressed.
 <title>Connecting the popup signal handler.</title>
 <programlisting>
     /* connect our handler which will popup the menu */
-    gtk_signal_connect_object (GTK_OBJECT (window), "button_press_event",
-       GTK_SIGNAL_FUNC (my_popup_handler), GTK_OBJECT (menu));
+    g_signal_connect_swapped (GTK_OBJECT (window), "button_press_event",
+       G_CALLBACK (my_popup_handler), GTK_OBJECT (menu));
 </programlisting>
 </example>
 
@@ -51,7 +51,7 @@ my_popup_handler (GtkWidget *widget, GdkEvent *event)
   g_return_val_if_fail (event != NULL, FALSE);
 
   /* The "widget" is the menu that was supplied when 
-   * gtk_signal_connect_object was called.
+   * g_signal_connect_swapped() was called.
    */
   menu = GTK_MENU (widget);
 
index d185d674c446f32831a7534c1ce0097f898ec586..c9aeaac88e2c398fd9957f79adbadd2b45d8f5a8 100644 (file)
@@ -46,9 +46,9 @@ You might do a non-modal #GtkMessageDialog as follows:
                                   filename, g_strerror (errno));
 
  /* Destroy the dialog when the user responds to it (e.g. clicks a button) */
- gtk_signal_connect_object (GTK_OBJECT (dialog), "response",
-                            GTK_SIGNAL_FUNC (gtk_widget_destroy),
-                            GTK_OBJECT (dialog));
+ g_signal_connect_swapped (GTK_OBJECT (dialog), "response",
+                           G_CALLBACK (gtk_widget_destroy),
+                           GTK_OBJECT (dialog));
 </programlisting>
 </example>
 </para>
index 339a6ee667bb30452a5755c37f42cf6e9581b6a3..33f24283a36fe8945384778d815aef8365098b32 100644 (file)
@@ -53,13 +53,13 @@ GtkWidget *frame2 = gtk_frame_new (NULL);
 gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN);
 gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_IN);
 
-gtk_widget_set_usize (hpaned, 200 + GTK_PANED (hpaned)->gutter_size, -1);
+gtk_widget_set_size_request (hpaned, 200 + GTK_PANED (hpaned)->gutter_size, -1);
 
 gtk_paned_pack1 (GTK_PANED (hpaned), frame1, TRUE, FALSE);
-gtk_widget_set_usize (frame1, 50, -1);
+gtk_widget_set_size_request (frame1, 50, -1);
 
 gtk_paned_pack2 (GTK_PANED (hpaned), frame1, FALSE, FALSE);
-gtk_widget_set_usize (frame1, 50, -1);
+gtk_widget_set_size_request (frame1, 50, -1);
 </programlisting>
 </example>
 
index 77797b249fa10c5df5519619d9c1bdc0a2fa4b56..d3fdb314c77a2581b065a9ca1065aa43b881edba 100644 (file)
@@ -448,7 +448,7 @@ modifiers can be:
 The action that is bound to the key is a sequence
 of signal names (strings) followed by parameters for 
 each signal. The signals must be action signals.
-(See gtk_signal_new()). Each parameter can be
+(See g_signal_new()). Each parameter can be
 a float, integer, string, or unquoted string
 representing an enumeration value. The types of
 the parameters specified must match the types of the 
index e2d84184cb31f45316dbb50dd2aa9153d7144ad5..2668456ae160994b294a1702800531426d672bf2 100644 (file)
@@ -5,6 +5,12 @@ Signals
 Object methods and callbacks.
 
 <!-- ##### SECTION Long_Description ##### -->
+<para>
+The GTK+ signal system merely proxies the GLib signal system now. For future 
+usage, direct use of the #GSignal API is recommended, this avoids significant 
+performance hits where #GtkArg structures have to be converted into #GValues.
+</para>
+
 <refsect2>
 <title>What are signals?</title>
 <para>
@@ -126,7 +132,7 @@ maps to a unique connection id.
 The functions responsible for translating an array of #GtkArgs
 to your C compiler's normal semantics are called Marshallers.
 They are identified by
-gtk_marshal_return_value__parameter_list()
+gtk_marshal_<replaceable>return_value</replaceable>__<replaceable>parameter_list</replaceable>()
 for example a C function returning a gboolean and taking a gint
 can be invoked by using gtk_marshal_BOOL__INT().
 Not all possibly combinations of return/params are available,
@@ -396,7 +402,7 @@ isn't being emitted.
 </para>
 
 @object: the object whose signal handlers you wish to stop.
-@signal_id: the signal identifier, as returned by gtk_signal_lookup().
+@signal_id: the signal identifier, as returned by g_signal_lookup().
 <!-- # Unused Parameters # -->
 @i: 
 @s: 
index 6c9e009a984d6a423b642466bd4e4314512cfd71..0cc323b2694969d4b24ef8f9b08bfbe02d4bdbb9 100644 (file)
@@ -61,7 +61,7 @@ void create_integer_spin_button (void) {
  */
 
 gfloat grab_int_value (GtkSpinButton *a_spinner, gpointer user_data) {
-   return gtk_spin_button_get_value_as_float (a_spinner);
+   return gtk_spin_button_get_value (a_spinner);
 }
 
 void create_floating_spin_button (void) {
index 58bb5e39cf21440e63c8a0f82690dfa632869e7e..51ab152f35d80217b5b39516eabdb4b1307cec73 100644 (file)
@@ -593,7 +593,8 @@ types related to the text widget and how they work together.
 
 <!-- ##### MACRO GTK_TEXT_VIEW_PRIORITY_VALIDATE ##### -->
 <para>
-
+The priority at which the text view validates onscreen lines
+in an idle job in the background.
 </para>
 
 
index b53968d1bff8837aa4054c96a4ead763948badf6..c14925f8fde1ab851e2ccaa659ddde7369a7207c 100644 (file)
@@ -37,15 +37,15 @@ void make_toggles (void) {
    /* Makes this toggle button invisible */
    gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle1), TRUE);
    
-   gtk_signal_connect (GTK_OBJECT (toggle1), "toggled",
-                       GTK_SIGNAL_FUNC (output_state), NULL);
+   g_signal_connect (GTK_OBJECT (toggle1), "toggled",
+                     G_CALLBACK (output_state), NULL);
    gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
                        toggle1, FALSE, FALSE, 2);
 
    toggle2 = gtk_toggle_button_new_with_label ("Hi, i'm another toggle button.");
    gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle2), FALSE);
-   gtk_signal_connect (GTK_OBJECT (toggle2), "toggled",
-                       GTK_SIGNAL_FUNC (output_state), NULL);
+   g_signal_connect (GTK_OBJECT (toggle2), "toggled",
+                     G_CALLBACK (output_state), NULL);
    gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
                        toggle2, FALSE, FALSE, 2);
 
index dce3c7f2aa800efda96cff28f50e7f7b2a0da110..8a7ad5a7aec947a3cf182723c3253bf3930b23e1 100644 (file)
@@ -114,7 +114,7 @@ upshot is that @allow_shrink should always be set to %FALSE.
 <para>
 Sometimes when you think you want to use @allow_shrink, the real problem is that
 some specific child widget is requesting too much space, so the user can't
-shrink the window sufficiently. Perhaps you are calling gtk_widget_set_usize()
+shrink the window sufficiently. Perhaps you are calling gtk_widget_set_size_request()
 on a child widget, and forcing its size request to be too large. Instead of
 setting the child's usize, consider using gtk_window_set_default_size() so that
 the child gets a larger allocation than it requests.
index 5ff830e86e79b1f8c8bd26716bd4be7c95ac71c9..e0fd5359f588df48ebaebe6f028a2f822ab03188 100644 (file)
       <firstterm>Model/View/Controller</firstterm> design and consists
       of four major parts:
       <simplelist>
-       <member>the tree view widget (GtkTreeView)</member>
-       <member>the view column (GtkTreeViewColumn)</member>
-       <member>the cell renderers (GtkCellRenderer etc.)</member>
-       <member>and the model interface (GtkTreeModel)</member>
+       <member>the tree view widget (<structname>GtkTreeView</structname>)</member>
+       <member>the view column (<structname>GtkTreeViewColumn</structname>)</member>
+       <member>the cell renderers (<structname>GtkCellRenderer</structname> etc.)</member>
+       <member>and the model interface (<structname>GtkTreeModel</structname>)</member>
       </simplelist>
       The <emphasis>View</emphasis> is composed of the first three,
        while the last is the <emphasis>Model</emphasis>.  One of the
@@ -49,7 +49,7 @@
       data &mdash; that is left as an exercise for the reader.  More
       information can be found on this in the <link
       linkend="GtkTreeStore">GtkTreeModel</link> section.
-      <programlisting><![CDATA[
+      <informalexample><programlisting><![CDATA[
 {
   GtkTreeStore *model;
   GtkWidget *view;
@@ -84,7 +84,7 @@
   gtk_tree_view_append_column (GTK_TREE_VIEW (view), column);
 }
 ]]>
-      </programlisting>
+      </programlisting></informalexample>
     </para>
   </refsect1>
 </refentry>